home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / pcpil / pidoc5.txt < prev    next >
Text File  |  1994-02-28  |  23KB  |  577 lines

  1. Chapter 8. SPRITES - MOVING PICTURE BLOCKS
  2.  
  3. If you wish to see a sample program which makes use of sprites, run 
  4. SAMPLE9.PIL on the PILOT distribution diskette.  
  5.  
  6. PILOT supports the use of sprites. A sprite is a small image or picture 
  7. consisting of a grid of 32 pixels across by 32 pixels up and down. Each pixel 
  8. can be one of three colors or transparent.  Within a PILOT program sprites 
  9. can be displayed on the screen, either standing still or in motion.  
  10.  
  11. Sprites are stored on disk and within a PILOT program in a sprite table. A 
  12. sprite table consists of eight 32 pixel by 32 pixel sprites, numbered 1 to 8.  
  13. Pictorially, a sprite table can be viewed as follows: 
  14.  
  15.          A Sprite Table
  16.  
  17.      +-----+-----+-----+-----+
  18.      |     |     |     |     |
  19.      |  1  |  2  |  3  |  4  |
  20.      |     |     |     |     |
  21.      +-----+-----+-----+-----+
  22.      |     |     |     |     |
  23.      |  5  |  6  |  7  |  8  |
  24.      |     |     |     |     |
  25.      +-----+-----+-----+-----+  
  26.  
  27.  
  28. Each of the boxes, numbered 1 to 8, above represents one 32 pixel by 32 pixel 
  29. sprite.  
  30.  
  31.  
  32. PILOT allows you to combine the sprites in a table in order to create larger 
  33. sprites. There are several possible ways to create these combinations. The 
  34. first combines two sprites to create a 32 by 64 pixel sprite. This is 
  35. accomplished by simply viewing a sprite table in the following way: 
  36.  
  37.      +-----+-----+-----+-----+
  38.      |     |     |           |
  39.      |     |     |    11     |
  40.      |     |     |           |
  41.      +  9  +  10 +-----+-----+
  42.      |     |     |           |
  43.      |     |     |    12     |
  44.      |     |     |           |
  45.      +-----+-----+-----+-----+  
  46.  
  47. Sprites 1 and 5 can be combined and treated as a pair by referring to the 
  48. combination as sprite 9. Sprites 2 and 6 can be combined as sprite 10.  
  49. Sprites 3 and 4 can be combined as sprite 11. And sprites 7 and 8 can be 
  50. combined as 12.  
  51.  
  52. You can also combine 4 sprites in the two following ways: 
  53.  
  54.      +-----+-----+-----+-----+
  55.      |           |           |
  56.      |           |           | 
  57.      |           |           |
  58.      +     13    +    14     +
  59.      |           |           |
  60.      |           |           |
  61.      |           |           |
  62.      +-----+-----+-----+-----+  
  63.  
  64. Sprite 13 is a combination of sprites 1,2,5 and 6. Sprite 14 is a combination 
  65. of sprites 3,4,7 and 8. 
  66.  
  67.      +-----+-----+-----+-----+
  68.      |                       |
  69.      |          15           | 
  70.      |                       |
  71.      +-----+-----+-----+-----+
  72.      |                       |
  73.      |          16           |
  74.      |                       |
  75.      +-----+-----+-----+-----+  
  76.  
  77. Sprite 15 is a combination of sprites 1,2,3 and 4. Sprite 16 is a combination 
  78. of sprites 5,6,7 and 8. 
  79.  
  80. Finally, all 8 sprites can be treated as one large sprite, numbered sprite 
  81. 17.  
  82.  
  83.      +-----+-----+-----+-----+
  84.      |                       |
  85.      |                       |
  86.      |                       |
  87.      +          17           +
  88.      |                       |
  89.      |                       |
  90.      |                       |
  91.      +-----+-----+-----+-----+  
  92.  
  93.  
  94. Within one sprite table you can think of the eight sprites in any combination 
  95. that makes sense for your own program. For example, you could use sprite 16 
  96. for a 128 by 32 pixel sprite, use sprite 11 for a 64 by 32 pixel sprite, and 
  97. use sprites 1 and 2 for two 32 by 32 pixel sprites.  
  98.  
  99.  
  100. On disk, a sprite table is stored in a 2048 byte file with the file suffix of 
  101. .SPR. For example: 
  102.  
  103.        ATOMS.SPR
  104.  
  105. In one PILOT program you can have as many sprite tables as you need, limited 
  106. only by the amount of memory you wish to set aside for sprite tables.  
  107.  
  108.  
  109. HOW TO EDIT SPRITE TABLES
  110.  
  111.  
  112. The program SE,  Sprite Editor, is provided to create and edit sprite tables. 
  113. With SE you can: 
  114.  
  115. 1. Cut sprite images out of a graphics image file and paste them into a 
  116. sprite table.  
  117.  
  118. 2. Cut sprites out of a sprite table and paste them into a graphics image 
  119. file.  
  120.  
  121. 3. Touch up a sprite in a sprite table.  
  122.  
  123. 4. Create a sprite from scratch via fat bits mode 
  124.  
  125. 5. View any of the 17 possible sprite combinations that can be used.  
  126.  
  127. To run SE and use sprites, requires a color display adapter. A monochrome 
  128. adapter does not support the use of sprites. You can start SE by entering the 
  129. command: 
  130.  
  131.        SE
  132.  
  133. The SE program prompts you for the name of the sprite table you wish to work 
  134. on. If the sprite table already exists, enter the root name of the sprite 
  135. table file (without the .SPR on the end).  To create a new sprite table, 
  136. either enter the name of the new the sprite table file (without the .SPR on 
  137. the end) or push the ENTER key.  
  138.  
  139. Next, SE prompts you for the name of a graphics image file. This file must be 
  140. in the bit-mapped format. It could be made by GIE, the PILOT GSX: statement 
  141. or another graphics creation program that saves images in bit-mapped format.  
  142. Images saved in a compressed format will not load into the sprite editor. If 
  143. you intend to cut sprites out of a graphic image and paste them into the 
  144. sprite table, enter the name of the graphics image at this point. Be sure to 
  145. enter the entire file name, including the suffix. If you do not wish to work 
  146. with a graphics image, just push ENTER.  
  147.  
  148. Once SE has started, the top left portion of the screen displays the sprite 
  149. table you are working on.  The top right portion of the screen displays a 
  150. help menu. If you have loaded a graphics image, part of it is displayed in 
  151. the bottom portion of the screen.  Note also that on the bottom left portion 
  152. of the image a sprite-sized cut-out box overlays the bit-mapped image.  
  153.  
  154. The sprite editor is controlled by means of the various function and cursor 
  155. keys. The operations you can perform are shown below.  
  156.  
  157.  
  158. F1 - select sprite to work on 
  159.  
  160. Each time you push F1, the next sprite in line is selected for operation. The 
  161. current sprite is indicated by a colored number under the sprite.  
  162.  
  163.  
  164. F2 - select sprite layout 
  165.  
  166. Each time you push F2, the sprite layout changes. You will see the possible 
  167. combinations that can be created by referring to sprites numbered 1 through 
  168. 17. Notice that the cut-out box on the graphic image changes size to reflect 
  169. the sprite layout and sprite number selected.  
  170.  
  171.  
  172. F3 - copy from image to sprite 
  173.  
  174. F3 copies the contents of the cut-out box on the graphic image to the 
  175. currently selected sprite. (If you make a mistake, you can undo the last 
  176. operation by pushing the Esc key at any time.) With this feature, you can use 
  177. any paint program, such as GIE or its equivalent, to create sprites, then use 
  178. the F3 function in SE to cut the picture out of the graphics image and paste 
  179. it into a sprite table.  
  180.  
  181. F4 - copy from sprite to image 
  182.  
  183. F4 copies the currently selected sprite to the graphic image within the cut-
  184. out box. (If you make a mistake, the Esc key can be used to undo the 
  185. mistake.) Using the F4 key you can copy a sprite back to a graphic image so 
  186. that you can later use a graphics editor to modify the sprite.  
  187.  
  188.  
  189. F5 - load new sprite table 
  190.  
  191. When you push F5, SE prompts for the name of a sprite table. The new sprite 
  192. table will be loaded over the currently loaded sprite table.  When you push 
  193. F5, the prompt for a table name contains the last table name you entered in 
  194. brackets. If you wish to load the same table just push ENTER. Loading a new 
  195. table destroys the currently loaded table in memory so be sure to save the 
  196. current table first if you wish to do so. If you wish to load another table 
  197. name, type the name (without the .SPR appended to the name), and push ENTER. 
  198. You can precede the file name with a drive or path designation if needed. If 
  199. you have made a mistake and wish to cancel the load command, push the Esc key 
  200. prior to pushing ENTER.  
  201.  
  202. F6 - save sprite table on disk 
  203.  
  204. If you wish to save the sprite table without leaving the SE program, push the 
  205. F6 key. SE prompts for the name of the file to be saved. If you wish to save 
  206. to the file name shown in brackets, just push ENTER. If you wish to enter 
  207. another file name, type it without the .SPR suffix, then push ENTER. If you 
  208. wish to cancel the save operation, push the Esc key.  
  209.  
  210. F7 - load graphics image 
  211.  
  212. The F7 key loads a new graphics image for display on the bottom portion of 
  213. the screen. SE prompts for the name of the image file to be loaded, showing 
  214. the last supplied name in brackets. To load the same file just push ENTER. To 
  215. load a different file, type the file name and push ENTER. To cancel the 
  216. operation push Esc.  
  217.  
  218. F8 - save graphics image 
  219.  
  220. The F8 key saves the current graphics image on disk.  To save the image to 
  221. the file name shown in brackets, just push the ENTER key. To save to another 
  222. file, enter the file name then push ENTER. To cancel the save operation push 
  223. Esc.  
  224.  
  225. F9 - enter fat bits, or touch-up mode 
  226.  
  227. This key can be used only when a sprite number in the range 1 through 8 is 
  228. selected. The selected sprite is shown in an expanded format so that 
  229. individual pixels can be identified and edited. This mode can be used to 
  230. create a totally new sprite from scratch or can be used to edit or touch up, 
  231. a sprite created previously. See Fat Bits Mode below for more information. On 
  232. combination sprites (numbers 9-17) you will have to edit one 32 by 32 pixel 
  233. segment at a time.  
  234.  
  235. F10 - exit sprite editor 
  236.  
  237. The F10 key terminates processing of the SE program.  If you have made any 
  238. changes to the sprite table, SE prompts for the name of a file in which to 
  239. save the sprite table. If you have previously given a sprite table name, the 
  240. name is shown in brackets. To save to the same file name just push ENTER. To 
  241. save to another file name, enter the file name and push ENTER. If there is no 
  242. name shown in brackets (ie, you have not previously entered a sprite table 
  243. file name), you must enter the name of a file in order to save the sprite 
  244. table; just pushing ENTER in this case bypasses the save operation.  To force 
  245. a bypass of the save operation, push the Esc key.  
  246.  
  247. If the graphics image has been modified, SE prompts similarly for the name of 
  248. a file to which the graphics image is to be written. If you write the 
  249. graphics image to the same file name, then the original graphics image is 
  250. overwritten on disk. If you wish to retain the original image then enter a 
  251. different file name.  If you wish to discard the loaded image then push the 
  252. ESC key to bypass the save operation.  
  253.  
  254.  
  255. ESC - undo last operation 
  256.  
  257. The Esc key can be used to back out of an erroneous operation. If pushed 
  258. after F3 or F4, the copy operation is undone. If pushed when prompted for a 
  259. file name to load or save, the load or save is canceled.  
  260.  
  261. ARROW KEYS - roll graphics image 
  262.  
  263. The four arrow keys: up, down, left and right can be used to roll the 
  264. graphics image one pixel in any direction. Holding shift while pushing any of 
  265. the arrow keys rolls the graphics image by 32 pixels at a time. As the image 
  266. is rolled, it wraps around from the left to the right or the top to the 
  267. bottom.  Notice that even though part of the image is hidden behind the upper 
  268. portion of the SE screen, as the image is rolled up or down, the hidden 
  269. portion can be brought into view on the bottom of the screen. Using these 
  270. keys, the image can be adjusted to place any desired portion within the cut-
  271. out box shown in the lower left part of the screen.  
  272.  
  273.  
  274. FAT BITS MODE 
  275.  
  276. The F9 key can be used to enter fat bits mode.  To use fat bits mode the 
  277. currently selected sprite number must be in the range 1 to 8. F9 is ignored 
  278. for higher numbered sprites.  
  279.  
  280. In fat bits mode, the sprite is displayed in normal size and an expanded size 
  281. that shows the color of each individual pixel. Also shown is a help menu and 
  282. several status indicators. To the right of the sprite is a number from 1 to 3 
  283. showing which color is presently selected for pixel setting. Next to the 
  284. number is a plus sign, if stream set mode is selected, or a minus sign, if 
  285. stream clear mode is selected. Also shown is a model TS:, TYPE SCREEN 
  286. statement, showing the mode and background colors you would use in your PILOT 
  287. program to produce the same color combinations.  
  288.  
  289. Within the expanded sprite, a small box-shaped  cursor shows the position of 
  290. the current pixel within the sprite.  
  291.  
  292. The sprite can be modified, pixel by pixel, through the use of the various 
  293. function and cursor keys as shown here.  
  294.  
  295. To set or clear a pixel you can move the cursor to the desired pixel, then 
  296. push F1 or F2. If you wish to set or clear several contiguous pixels, you can 
  297. use stream set or stream clear modes.  With either stream mode set each pixel 
  298. is set or cleared immediately as the cursor is moved from one pixel to 
  299. another by the arrow keys.  
  300.  
  301.  
  302. F1 - set a pixel 
  303.  
  304. The F1 key sets the current pixel to the currently selected color. F1 also 
  305. turns off either stream mode, if set.  
  306.  
  307. F2 - clear a pixel 
  308.  
  309. The F2 key clears the current pixel to the background color. F2 also turns 
  310. off either stream mode if set.  
  311.  
  312. Shift F1 - stream set mode on 
  313.  
  314. Shift-F1 turns on stream set mode. When stream set mode is on, the cursor 
  315. keys automatically set each pixel to the current color as the cursor moves 
  316. from one pixel to another.  
  317.  
  318. Shift F2 - stream clear mode on 
  319.  
  320. Shift-F2 turns on stream clear mode. When stream clear mode is on, the cursor 
  321. keys automatically clear each pixel to the background color as the cursor 
  322. moves from one pixel to another.  
  323.  
  324. Shift F5 - clear entire sprite to background 
  325.  
  326. The shift-F5 combination erases the entire sprite to background color.  
  327.  
  328. F8 - change screen mode 
  329.  
  330. The F8 key alternates between screen modes 4 and 5. Note that the color 
  331. combinations change as does the model TS: statement shown next to the sprite. 
  332. This allows you to see the sprite as it will appear in your PILOT program.  
  333.  
  334. F10 - exit fat bits mode 
  335.  
  336. The F10 key returns to the SE main screen with the edited sprite placed in 
  337. the sprite table.  
  338.  
  339. ARROWS - move pixel cursor 
  340.  
  341. The up, down, right and left arrow keys can be used to move the pixel cursor 
  342. one space in any direction.  If the stream set or stream clear mode is on, 
  343. then moving the cursor also sets or clears the pixel to which the cursor 
  344. moves.  
  345.  
  346. PLUS and MINUS - change background color 
  347.  
  348. The + key increments the background color. The - key decrements the 
  349. background color. The possible colors are 0 through 31. Backgrounds 16 
  350. through 31 are the same as 0 through 15 except that the foreground colors are 
  351. brighter. Note that as the background color changes on the screen, the model 
  352. TS: statement changes to reflect the current color number. This command lets 
  353. you see the sprite displayed with in the colors you will see in your PILOT 
  354. program.  
  355.  
  356. USING SPRITES IN A PILOT PROGRAM
  357.  
  358. To use sprites in a PILOT program follow these steps: 
  359.  
  360. 1. Use SE to create a sprite table. The sprite table is saved on a disk file, 
  361. say MINE.SPR 
  362.  
  363. 2. In the PILOT program, create a string variable 2218 bytes longs to hold 
  364. the sprite table. The following statement would work fine: 
  365.   
  366.        D:MINE$(2218)
  367.  
  368. 3. Read the sprite table from disk into the string variable via statements 
  369. such as: 
  370.  
  371.        FX:MINE.SPR
  372.        FI:0,MINE$
  373.  
  374. 4. Set the screen mode to a graphics mode valid for sprites (mode 4, 5 or 6).  
  375. For example: 
  376.  
  377.         TS:M4
  378.  
  379. 5. Use the Graphics statement to specify the current sprite table via: 
  380.  
  381.         G: S MINE$
  382.  
  383. 6. Use the Graphics statement to display or move sprites on the screen.  
  384.  
  385. Sprites are manipulated via turtle graphics commands on the Graphics 
  386. statement. The turtle graphics commands allow you to move an invisible turtle 
  387. around on the screen by commands such as forward, right, left and draw. To 
  388. manipulate sprites you can: 
  389.  
  390. 1. Draw any sprite at the current turtle location and leave it there.  
  391.  
  392. 2. Remove a previously drawn sprite from the screen.  
  393.  
  394. 3. Draw a sprite at the current turtle location and attach it to the turtle 
  395. so that it is dragged around on the screen when the turtle is moved.  
  396.  
  397. 4. Leave a sprite on the screen, move the turtle to some other location on 
  398. the screen, then return to the spot where the sprite was left to move or 
  399. remove it.  
  400.  
  401. SPRITE DRAWING 
  402.  
  403. When a sprite is drawn on the screen, it is located such that the upper left 
  404. pixel of the sprite is at the turtle location. If a sprite hangs off the 
  405. right side of the screen, it wraps to the left side.  Likewise, if the sprite 
  406. hangs off the bottom of the screen, it wraps to the top of the screen.  
  407.  
  408. When a sprite is drawn, it is combined with the data already on the screen so 
  409. that the background-colored bits in the sprite are transparent. That is, the 
  410. previous display data shows through wherever the sprite pixels are not set to 
  411. a color.  
  412.  
  413. Colored pixels in a sprite are combined with the previous display data so 
  414. that when the sprite is again removed, the previous display data is restored.  
  415. This means that a sprite can pass over another complex picture without 
  416. changing the other picture.  In mathematical terms, sprites are drawn via an 
  417. exclusive or operation. This means also that drawing a sprite once in a 
  418. location makes it appear, then drawing it again in the same location makes it 
  419. disappear again.  
  420.  
  421. SPRITE COMMANDS
  422.  
  423. The specific commands that affect sprites are as follows.  
  424.  
  425. G: S V$
  426.  
  427. Makes string variable V$ the current sprite table.  V$ must have been first 
  428. dimensioned at least 2218 bytes and must have been read from a sprite file as 
  429. shown above. There may be any number of sprite tables in memory and you can 
  430. change the current sprite table as often as necessary.  
  431.  
  432. G: Sn
  433.  
  434. Displays (or erases) sprite number n, (n from 1 to 17). Also attaches sprite 
  435. n to the turtle.  
  436.  
  437. G: S0
  438.  
  439. If any sprite is attached to the turtle, it is detached and left in its 
  440. current location. This command insures that no sprite is attached to the 
  441. turtle.  
  442.  
  443. G: Fn
  444.  
  445. The normal forward command which moves the turtle. If a sprite is attached to 
  446. the turtle, it is moved along with the turtle to the new location. When a 
  447. sprite is attached to the turtle no line is drawn by the forward command.  
  448.  
  449. G: Rn;Ln
  450.  
  451. The normal turtle right and left turn commands.  These commands are used to 
  452. set the direction of motion of a sprite when attached to the turtle.  
  453.  
  454. G: Dx,y
  455.  
  456. The normal draw to pixel x,y command which, when a sprite is not attached to 
  457. the turtle, draws a line to the absolute pixel named. When a sprite is 
  458. attached to the turtle, no line is drawn, but the sprite is moved from the 
  459. old location to the new location.  
  460.  
  461. G: Gx,y
  462.  
  463. The move to absolute pixel command.  If a sprite is attached to the turtle, 
  464. it is detached and left in its present location. The turtle moves to the new 
  465. location without any sprite attached.  
  466.  
  467. G: Jn
  468.  
  469. If a sprite other than sprite n is attached to the turtle, it is detached and 
  470. left in its present location. Then the turtle jumps to the location and 
  471. heading, where sprite n was last left on the screen.  
  472.  
  473. G: Wn
  474.  
  475. This command causes a wait for n 60ths of a second. It does not directly 
  476. affect sprites, except that it is very useful in adjusting the speed at which 
  477. sprites move.  
  478.  
  479. All of the above commands, as well as all other Graphic statement commands 
  480. can be combined per the normal G: statement syntax.  
  481.  
  482.  
  483. SPRITE HINTS
  484.  
  485. Often sprites can be used as "little pictures", that is, as a way to display 
  486. small illustrations or diagrams which do not move at all on the screen.  
  487. Sometimes a sprite is an economical way to store a graphic image rather than 
  488. to use an entire screen image.  
  489.  
  490. To make a sprite move, attach it to the turtle, then use the forward, right 
  491. and left commands in a loop to move the turtle.  
  492.  
  493. Though a sprite can theoretically be at any pixel location, in actuality 
  494. sprites are drawn at the nearest 2-pixel boundary vertically, and the nearest 
  495. 4-pixel boundary horizontally. So moving a sprite in steps less than this 
  496. size may not cause any visible motion.  
  497.  
  498. There are two ways to affect the speed of motion. The first is by adjusting 
  499. the step size taken by the forward command. The larger the step, the faster 
  500. the apparent motion. The second is to introduce delays into the loop which 
  501. contains the forward command. The G:Wn command can be used to do this. The 
  502. longer the delay at each step, the slower the apparent motion.  
  503.  
  504. The smoothest motion is attained by the smaller sprites (numbers 1 to 8). The 
  505. larger the sprite, the more processing time it takes to display it, and the 
  506. less smoothly it will appear to move.  
  507.  
  508. To move more than one sprite at a time, use the G:Jn command to jump back and 
  509. forth between them, moving each one a small amount per iteration.  
  510.  
  511. To make a sprite change shape as it moves (eg. a man walking across the 
  512. screen), create a series of sprites which depict the man in each position. 
  513. Then as the sprite is moved via forward statements, rotate through the series 
  514. of positions simultaneously.  
  515.  
  516. A graphics statement command sequence that performs a complex animation can 
  517. be stored in a string variable and called out via the X: statement. Such a 
  518. statement can be up to 256 bytes in length.  
  519.  
  520. SPRITE EXAMPLES 
  521.  
  522. SAMPLE9.PIL on the PILOT distribution diskette is a sample sprite program. 
  523. Also, SAMPLE9.SPR contains a sprite table which you could copy and use for 
  524. your own experimentation.  
  525.  
  526. The following examples assume that these statements have been executed 
  527. previously in the PILOT program.  These statements read the sprite table from 
  528. file MYSPRITE.SPR to the string variable X$, set graphics mode, and set X$ as 
  529. the current sprite table.  
  530.  
  531.        D:X$(2218)
  532.        FX:MYSPRITE.SPR
  533.        FI:0,X$
  534.        TS:M4
  535.        G:SX$
  536.       
  537. Example 1: To place sprites 1, 2 and 3 at different stationary 
  538. screen locations.  
  539.  
  540.        G:G100,50;S1; G200,87;S2; G225,125;S3; S0 
  541.  
  542. Example 2: To make sprite 3 appear, move it across the screen, then make it 
  543. disappear.  
  544.  
  545.        G:G0,0; S3; H90; *200(F8; W3); S3; S0
  546.  
  547. Example 3: To make sprite 3 appear, move it from the bottom of the screen to 
  548. the top, then leave it stationary on the screen.  
  549.  
  550.        G:G100,160; S3; H0; *400(F1); S0
  551.  
  552. Example 4: To make a sprite appear, then go off and do other things, then 
  553. later to move the sprite to a new location and leave it there.  
  554.  
  555.        G:G100,60; S6; S0
  556.        < go off and do other things>
  557.        G:J6; D190,20; S0; 
  558.  
  559. Example 5: To move two sprites simultaneously.  The first statement below 
  560. positions each sprite at its starting position and heading. The second 
  561. statement jumps back and forth between them moving each one a small amount, 
  562. repeatedly.  
  563.  
  564.        G:G10,10;S3;H180; G280,100;S4;H270; S0
  565.        G:*100(J3;F4; J4;F4; W5); S0
  566.  
  567. Example 6: move a sprite in a circle 
  568.  
  569.        G:S7; *40(F10;R9;W1)
  570.  
  571. Example 7: move a sprite and change the shape as it moves. This example 
  572. assumes that sprites 1 and 2 have been created to show a man walking with 
  573. arms and legs in two different positions.  
  574.  
  575.        G:*20(S1;W5;F4;S1;S0; S2;W5;F4;S2;S0)
  576.  
  577.